<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<meta http-equiv="pragma" content="no-cache">
		
		<script type="text/javascript" src="js/tools/jquery-1.4.2.min.js"></script>
		
        <script charset="utf-8" src="js/tools/editor/kindeditor-min.js"></script>
        <script type="text/javascript" src="js/tools/jqueryurl.js"></script>
        <script charset="utf-8" src="admin/js/singlePage.js"></script>
<style>
table {font-size: 12px;}
table tr {background-color: #F1F6F6;}
table tr td {border: 1px solid #D9D9D9;color: black;padding: 2px;}
</style>

<script type="text/javascript">
var user='<s:property value="#session.user"/>';
</script>
</head>
<body>
	<s:actionmessage/>
	<s:if test="%{singlePage == null}">
	    <form action="singlePage!addSinglePage.action" method="post" onsubmit="return check();">
	</s:if>
	<s:else>
	     <form action="singlePage!modifySinglePage.action" method="post" onsubmit="return check();">
	     <input type="hidden" name="singlePage.id" value="<s:property value="singlePage.id"/>">
	</s:else>
	 <input type="hidden" name="singlePage.columnId" id="columnId" value="">
		<table  style="width: 98%;" align="center">
			<tr><td width="10%">标题:</td><td><input type="text" name="singlePage.title" id="title" value="<s:property value="singlePage.title"/>"/></td></tr>
			<tr><td >排序:</td><td><input type="text" name="singlePage.sort" id="sort" value="<s:property value="singlePage.sort"/>" size=2/></td></tr>
			<tr><td>内容:</td><td><div><textarea name="singlePage.content" id="content" rows="" cols=""><s:property value="singlePage.content"/></textarea></div></td></tr>
			<tr><td><input type="submit" onclick="" value="保存"/></td><td><input type="button" onclick="window.location.href='admin/singlepage/singlePageManager.jsp?singlePage.columnId='+$.query.get('singlePage.columnId')" value="返回列表"/></td></tr>
		</table>
	</form>
	</body>
</html>
